<?php
/**
 * LessCompilationBehavior class file.
 */

class LessCompilationBehavior extends CBehavior
{
	/**
	 * @return array the events and event handler for this behavior.
	 */
	public function events()
	{
		return array(
			'onBeginRequest'=>'beginRequest',
		);
	}

	/**
	 * Actions to take before starting the request.
	 */
	public function beginRequest()
	{
		if (YII_DEBUG)
			$this->owner->lessCompiler->compile();
	}
}
